﻿// Project: PageCrawlQueue, File: QueueFactory.cs
// Namespace: PageCrawlQueue, Class: QueueFactory
// Path: G:\Secure Project\WebCrawlerProject\PageCrawlQueue, Author: Radu-Mihail
// Code lines: 38, Size of file: 1.06 KB
// Creation date: 1/11/2009 12:39 AM
// Last modified: 1/11/2009 12:42 AM

#region Using directives
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
#endregion

namespace PageCrawlQueue
{
    /// <summary>
    /// Queue type
    /// </summary>
    public enum QueueType { BFS_QUEUE } // enum QueueType

    public static class QueueFactory
    {
        /// <summary>
        /// Get queue
        /// </summary>      
        /// <param name="link">Start link</param>
        /// <param name="maxDepth">Maximum depth</param>
        /// <param name="qType">Queue type</param>
        /// <returns>IQueue</returns>
       public static  IQueue GetQueue(string link, int maxDepth, int maxSize,  QueueType qType)
        {
            switch (qType)
            {
                case QueueType.BFS_QUEUE:
                    return new BFSQueue(link, maxDepth, maxSize);
                default:
                    return null;
            } // switch
        } // GetQueue(link, maxDepth, qType)
    
    }
}
